/////////////////////////////////////////////////////////////////////////////
// Name:        LocaldirPage.cpp
// Purpose:     
// Author:      yospaly
// Modified by: 
// Created:     05/01/2010 09:51:48
// RCS-ID:      
// Copyright:   Copyright (C) 2008, yospaly
// Licence:     
/////////////////////////////////////////////////////////////////////////////

// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"

#ifdef __BORLANDC__
#pragma hdrstop
#endif

#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif

////@begin includes
////@end includes

#include "LocaldirPage.h"

////@begin XPM images
////@end XPM images


/*!
 * LocaldirPage type definition
 */

IMPLEMENT_DYNAMIC_CLASS( LocaldirPage, wxWizardPageSimple )


/*!
 * LocaldirPage event table definition
 */

BEGIN_EVENT_TABLE( LocaldirPage, wxWizardPageSimple )

////@begin LocaldirPage event table entries
////@end LocaldirPage event table entries

END_EVENT_TABLE()


/*!
 * LocaldirPage constructors
 */

LocaldirPage::LocaldirPage()
{
    Init();
}

LocaldirPage::LocaldirPage( wxWizard* parent )
{
    Init();
    Create( parent );
}


/*!
 * LocaldirPage creator
 */

bool LocaldirPage::Create( wxWizard* parent )
{
////@begin LocaldirPage creation
    wxBitmap wizardBitmap(wxNullBitmap);
    wxWizardPageSimple::Create( parent, NULL, NULL, wizardBitmap );

    CreateControls();
    if (GetSizer())
        GetSizer()->Fit(this);
////@end LocaldirPage creation
    return true;
}


/*!
 * LocaldirPage destructor
 */

LocaldirPage::~LocaldirPage()
{
////@begin LocaldirPage destruction
////@end LocaldirPage destruction
}


/*!
 * Member initialisation
 */

void LocaldirPage::Init()
{
////@begin LocaldirPage member initialisation
////@end LocaldirPage member initialisation
}


/*!
 * Control creation for LocaldirPage
 */

void LocaldirPage::CreateControls()
{    
////@begin LocaldirPage content construction
    LocaldirPage* itemWizardPageSimple1 = this;

    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
    itemWizardPageSimple1->SetSizer(itemBoxSizer2);

    wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
    itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW, 5);

    wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxVERTICAL);
    itemBoxSizer3->Add(itemBoxSizer4, 1, wxALIGN_CENTER_VERTICAL, 5);

    wxStaticText* itemStaticText5 = new wxStaticText( itemWizardPageSimple1, wxID_STATIC, _("Select Local Package Directory"), wxDefaultPosition, wxDefaultSize, 0 );
    itemStaticText5->SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, false, wxT("Tahoma")));
    itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_LEFT|wxALL, 5);

    wxStaticText* itemStaticText6 = new wxStaticText( itemWizardPageSimple1, wxID_STATIC, _("Select a directory where you want Citrus to store the installation files it downloads. The directory will be created if it does not already exists."), wxDefaultPosition, wxDefaultSize, 0 );
    itemStaticText6->Wrap(350);
    itemBoxSizer4->Add(itemStaticText6, 0, wxALIGN_LEFT|wxLEFT, 20);

    wxStaticBitmap* itemStaticBitmap7 = new wxStaticBitmap( itemWizardPageSimple1, wxID_STATIC, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer3->Add(itemStaticBitmap7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 20);

    wxStaticLine* itemStaticLine8 = new wxStaticLine( itemWizardPageSimple1, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
    itemBoxSizer2->Add(itemStaticLine8, 0, wxGROW|wxALL, 5);

    wxStaticBox* itemStaticBoxSizer9Static = new wxStaticBox(itemWizardPageSimple1, wxID_ANY, _("Local Package Directory"));
    wxStaticBoxSizer* itemStaticBoxSizer9 = new wxStaticBoxSizer(itemStaticBoxSizer9Static, wxHORIZONTAL);
    itemBoxSizer2->Add(itemStaticBoxSizer9, 0, wxGROW|wxALL, 5);

    wxDirPickerCtrl* itemDirPickerCtrl10 = new wxDirPickerCtrl( itemWizardPageSimple1, ID_DIRPICKERCTRL1, wxEmptyString, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDIRP_DEFAULT_STYLE|wxDIRP_USE_TEXTCTRL|wxDIRP_CHANGE_DIR );
    itemStaticBoxSizer9->Add(itemDirPickerCtrl10, 1, wxALIGN_TOP|wxALL, 5);

////@end LocaldirPage content construction
}


/*!
 * Should we show tooltips?
 */

bool LocaldirPage::ShowToolTips()
{
    return true;
}

/*!
 * Get bitmap resources
 */

wxBitmap LocaldirPage::GetBitmapResource( const wxString& name )
{
    // Bitmap retrieval
////@begin LocaldirPage bitmap retrieval
    wxUnusedVar(name);
    return wxNullBitmap;
////@end LocaldirPage bitmap retrieval
}

/*!
 * Get icon resources
 */

wxIcon LocaldirPage::GetIconResource( const wxString& name )
{
    // Icon retrieval
////@begin LocaldirPage icon retrieval
    wxUnusedVar(name);
    return wxNullIcon;
////@end LocaldirPage icon retrieval
}
